package com.corona.game;

import com.corona.Game;

/* compiled from: Battle.java */
/* loaded from: pokewilds.jar:com/pkmngen/game/DrivenAway.class */
public class DrivenAway extends Action {
    Pokemon target;
    String message;

    public DrivenAway(Pokemon t, String m) {
        super(new Object[0]);
        this.target = t;
        this.message = m;
    }

    @Override // com.corona.game.Action
    public void step(Game game) {
        game.actionStack.remove(this);
        if (this.target == game.battle.oppPokemon) {
            DrawBattle.shouldDrawOppPokemon = false;
        } else {
            DrawBattle.shouldDrawOwnPokemon = false;
        }
        game.insertAction(new DisplayText.Clear(game, new WaitFrames(game, 3, new DisplayText(game, this.message, (String) null, false, true, (Action) new SplitAction(new BattleFadeOut(game, null), new BattleFadeOutMusic(game, new SplitAction(new SetField(game, "playerCanMove", true, new SetField(game.musicController, "resumeOverworldMusic", true, null)), new WaitFrames(game, 8, null))))))));
    }
}
